<?php
    //phpinfo();
	/*<p>Current date. : <?php print (Date("l F d, Y")); ?></p>*/
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>lab1</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-15" />
  </head>
  <body class="">
  	<?php
		//Testar att v�nda p� en array
		/*$myArray = array("ett", "tv�", "tre", "fyra"); 
		echo $myArray;*/
		echo "Hejsan";
	
		/*
		$name = "Madeleine";
		$lastname = "Landerhjelm";
		echo $name . " " . $lastname; //Skriver ut b�da str�ngarna
		echo strlen($name .= $lastname);//Skriver ut b�da str�ngarna med hj�lp att jag plussar ihop dom med .=
		echo strpos($name,$lastname);//Skriver ut den l�ngsta str�ngen
		*/
		
		/*
		//Testar lite if
		$d = date("D");
		if($d == "Fri")
			echo "Have a nice weekend!";
		else if($d == "Sun")
			echo "Hace a nice Sunday";
		else
			echo "Have a nice day!";
		*/
		
		/*
		//Testar p� Numeric array
		//$cars = array("saab", "volvo", "BMW");
		$cars[0] = "Saab";
		$cars[1] = "Volvo";
		$cars[2] = "BMW";
		echo $cars[1];
		*/
		
		/*
		//Testar Associative array
		//$ages = array("Madde"=>28);
		$ages['Madde'] = "28";
		echo "Madde is " . $ages['Madde'] . " years old.";
		*/
		
		/*
		//While
		$i = 1;
		while($i <= 5){
			echo "The number is " . $i . "<br />";
			$i++;
		}
		*/
		
		/*
		//for
		for($i=1; $i<=5; $i++){
			echo "The number is " . $i . "<br />";
		}
		*/
		
		/*
		//foreach
		$i = array("one", "two", "three");
		foreach($i as $value){
			echo $value . "<br />";
		}
		*/
		
		/*
		//Funkitoner
		function testFunction(){
			echo "Hejsan p� dig, Lycka till p� kursen!";
		}
		echo "Nu ska vi testa lite text: ";
		testFunction();
		*/
	
		
		
	?>
  </body>
</html>
